<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
  <title>test_external_image (WaplTest)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
</head>
<body class="standalone-code">
  <pre><span class="ruby-comment cmt"># File test/test_wapl_helper.rb, line 53</span>
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">test_external_image</span>
    <span class="ruby-identifier">ext_img</span>  =<span class="ruby-value str">'&lt;row&gt;&lt;cell&gt;&lt;externalImage&gt;&lt;url&gt;http://localhost/1.gif&lt;/url&gt;&lt;/externalImage&gt;&lt;/cell&gt;&lt;/row&gt;'</span>
    <span class="ruby-identifier">ext_img_element_only</span>  =<span class="ruby-value str">'&lt;externalImage&gt;&lt;url&gt;http://localhost/1.gif&lt;/url&gt;&lt;/externalImage&gt;'</span>
    <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">ext_img</span>, <span class="ruby-identifier">external_image</span>(<span class="ruby-value str">'http://localhost/1.gif'</span>))
    <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">ext_img_element_only</span>, <span class="ruby-identifier">external_image</span>(<span class="ruby-value str">'http://localhost/1.gif'</span>,{}, <span class="ruby-keyword kw">true</span>))
    <span class="ruby-identifier">ext_img_complicated</span> = <span class="ruby-value str">'&lt;row&gt;&lt;cell&gt;&lt;externalImage scale=&quot;150&quot; file_type=&quot;png&quot;&gt;&lt;url&gt;http://localhost/1.gif&lt;/url&gt;&lt;/externalImage&gt;&lt;/cell&gt;&lt;/row&gt;'</span>
 
    <span class="ruby-identifier">assert_equal</span>(<span class="ruby-identifier">ext_img_complicated</span>, <span class="ruby-identifier">external_image</span>(<span class="ruby-value str">'http://localhost/1.gif'</span>, { <span class="ruby-identifier">:attributes=</span><span class="ruby-operator">&gt;</span>{ <span class="ruby-identifier">:file_type</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot;png&quot;</span>, <span class="ruby-identifier">:scale</span> =<span class="ruby-operator">&gt;</span><span class="ruby-value str">&quot;150&quot;</span>} }) )
 
  <span class="ruby-keyword kw">end</span></pre>
</body>
</html>